/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author PR
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface Wms3dPdH extends BasicModel<Wms3dPdH> {
  cwhcode?: string; // 仓库编码
  cwhname?: string; // 仓库名称
  cinvcode?: string; // 存货编码
  cinvname?: string; // 存货名称
  cinvstd?: string; // 规格型号
  cbatch?: string; // 批次
  iqty?: number; // 现存量
  pdQty?: number; // 实盘数量
  downQty?: number; // 下架数量
  upQty?: number; // 上架数量
  pdStatus?: string; // 盘点状态
  wms3dPdCList?: any[]; // 子表列表
}

export const wms3dPdHList = (params?: Wms3dPdH | any) =>
  defHttp.get<Wms3dPdH>({ url: adminPath + '/_3d/pd/wms3dPdH/list', params });

export const wms3dPdHListData = (params?: Wms3dPdH | any) =>
  defHttp.post<Page<Wms3dPdH>>({ url: adminPath + '/_3d/pd/wms3dPdH/listData', params });

export const wms3dPdHForm = (params?: Wms3dPdH | any) =>
  defHttp.get<Wms3dPdH>({ url: adminPath + '/_3d/pd/wms3dPdH/form', params });

export const wms3dPdHSave = (params?: any, data?: Wms3dPdH | any) =>
  defHttp.postJson<Wms3dPdH>({ url: adminPath + '/_3d/pd/wms3dPdH/save', params, data });

export const wms3dPdHDelete = (params?: Wms3dPdH | any) =>
  defHttp.get<Wms3dPdH>({ url: adminPath + '/_3d/pd/wms3dPdH/delete', params });


export const wms3dPdFindBoxData = (params?: Wms3dPdH | any) =>
  defHttp.get<Wms3dPdH>({ url: adminPath + '/_3d/pd/wms3dPdH/findBoxData', params });

export const wms3dPdHDown = (params?: any, data?: Wms3dPdH | any) =>
  defHttp.post<Wms3dPdH>({ url: adminPath + '/_3d/pd/wms3dPdH/pdDown', params, data });

export const wms3dPdHUpdateSpQty = (params?: any, data?: Wms3dPdH | any) =>
  defHttp.postJson<Wms3dPdH>({ url: adminPath + '/_3d/pd/wms3dPdH/updateSpQty', params, data });

// pdConfirm
export const wms3dPdHConfirm = (params?: any, data?: Wms3dPdH | any) =>
  defHttp.postJson<Wms3dPdH>({ url: adminPath + '/_3d/pd/wms3dPdH/pdConfirm', params, data });